<span class="<?php echo $class ?>">
  <label for="<?php echo $name ?>"><?php echo $title ?></label>
  <span class="form-element-body">
    <input type="text" name="<?php echo $name ?>" value="<?php echo $formatedValue ?>"/>
  </span>
  
  <script>
  $(document).ready(function() {
    //$("input[name=<?php echo $name ?>]").datepicker();
    $("input[name=<?php echo $name ?>]").datetimepicker({ timeFormat:'hh:mm:ss', showSecond:true });
  });
  </script>
</span>